package net.wofly.sale.stock.service.impl;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import net.wofly.sale.stock.repository.InOutStockDetailRepository;
import net.wofly.sale.stock.domain.InOutStockDetail;
import net.wofly.sale.stock.service.IInOutStockDetailService;

@Service("iInOutStockDetailService")
@Transactional
public class InOutStockDetailServiceImpl implements IInOutStockDetailService {

	@Autowired
	InOutStockDetailRepository inOutStockDetailRepository;

	@Override
	public InOutStockDetail save(InOutStockDetail entity) {
		return inOutStockDetailRepository.save(entity);
	}

	@Override
	public void delete(InOutStockDetail entity) {
		inOutStockDetailRepository.delete(entity);
	}

	@Override
	public void delete(String key) {
		inOutStockDetailRepository.delete(key);
	}

	@Override
	public InOutStockDetail findOne(String key) {
		return inOutStockDetailRepository.findOne(key);
	}

	@Override
	public List<InOutStockDetail> save(List<InOutStockDetail> entityList) {
		return (List<InOutStockDetail>) inOutStockDetailRepository.save(entityList);
	}
}
